<template>
  <NConfigProvider
    :locale="zhCN"
    :theme="theme"
    :theme-overrides="themeOverrides"
    :date-locale="dateZhCN"
  >
    <n-dialog-provider>
      <n-notification-provider>
        <n-message-provider>
          <slot name="default"></slot>
        </n-message-provider>
      </n-notification-provider>
    </n-dialog-provider>
  </NConfigProvider>
</template>

<script setup lang="ts">
import { zhCN, dateZhCN } from "naive-ui";
import {
  NDialogProvider,
  NNotificationProvider,
  NMessageProvider,
} from "naive-ui";

withDefaults(defineProps<{ theme?: any; themeOverrides?: any }>(), {
  themeOverrides: {
    common: {
      primaryColor: "#2d8cf0",
      primaryColorHover: "#3c9bff",
      primaryColorPressed: "#3c9bff",
      primaryColorSuppl: "#2d8cf0",
    },
    LoadingBar: {
      colorLoading: "#2d8cf0",
    },
  },
});
</script>
